ucTBICDSInstrument.ascx.cs
Code Type: C# Codebehind Class for ASP .NET User Control
Uses Classes: CQuestionnaire, CInstrumentResponse, XmlDocument, XmlReaderSettings, CIntake, CIQEngine, CCPA, CPWEvent, DataSet, DataTable


Lines of Code: 638

protected void Page_Load(object sender, EventArgs e)

	 

public bool InitializeControl(string strPatientDNF, string strMDWSSiteID)

	 

protected void GetQuestionnaire(long lMID, long lIntakeID)

	 Render the questionnaire for the passed in module from a XML string 

protected long GetNexModule(string strPatientDNF, string strMDWSSiteID) {
        long lMID = 0;
        CQuestionnaire q = new CQuestionnaire(BaseMstr);
        DataSet ds = q.GetNextModuleDS(strPatientDNF, strMDWSSiteID);

	Gets the next patient assigned module if no MID is provided 

public InstrumentOptions LoadInstrument(string strPatientDNF, string strMDWSSiteID, long lMID, long lIntakeID, long lPatPWEventModuleID, bool bReadOnly) {
        m_lInstrumentID = lMID;
        m_lItakeID = lIntakeID;

        TBIInstrumentModuleID = lMID.ToString();
        TBIInstrumentIntakeID = lIntakeID.ToString();
        TBIInstrumentPWEvtModID = lPatPWEventModuleID.ToString();
        TBIInstrumentReadOnly = bReadOnly;

        InitializeControl(strPatientDNF, strMDWSSiteID); 

        return new InstrumentOptions

	 Inititialize the instruments user control with the questions and responses for the selected instrument 

protected List<CInstrumentResponse.IntakeResponse> GetInstrumentResponses()

	 Iterates the submitted responses and load the necessary variables to write to DB and calculate scores. 

public void UpdateInstrumentFields( string strintake_id,
                                        string strpat_pw_id,
                                        string strpat_pw_event_id,
                                        string strpw_event_module_id)

	 Renders and shows the completed instrument report on screen 

public AddInstrumentResponsesResult AddInstrumentResponses(string strAssessmentDate,
                                                               string strAssessmentTime)

	  Submit the responses collection to the DB. 

protected bool IsReadOnly()

	Check if the event is read-only. If the Event was submitted to TIU then is LOCK and is Read-Only. 

protected bool ValidateResponsesIntegrity(List<CInstrumentResponse.IntakeResponse> responses)

	Validate Responses Integrity. Check that all responses correspond to the current MID. 

protected bool InsertInstrumentScores(long lMID, long lIntakeID, string strJsonScore)

	Insert Instrument Scores 

public bool RemoveAllResponses(long lIntakeID,
                                   long lMID)

	Remove ALL responses 

public bool RemovePrevResponses(List<CInstrumentResponse.IntakeResponse> responses, long lIntakeID) 

	Remove responses from previous time submitted not present in a new submittal of the instrument 

public bool RemoveResponse(CInstrumentResponse.IntakeResponse response, long lIntakeID)

	Removes a specific RID from the intrument intake 

public class InstrumentOptions {

	 Class to model JSON object to pass on to the callback of the load instrument DirectMethod 

	

